import 'element-plus/dist/index.css'
import 'nprogress/nprogress.css'
import 'viewerjs/dist/viewer.css'
import '@/style/index.scss'
import './style/tailwind.css'
import Viewer from 'v-viewer'
import { vviewdefaultOptions } from './common/index'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import components from '@/components/index'
import Vue3DraggableResizable from 'vue3-draggable-resizable'
import 'vue3-draggable-resizable/dist/Vue3DraggableResizable.css'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import App from './App.vue'
import router from './router'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(components)
app.use(Viewer, {
    defaultOptions: vviewdefaultOptions
})
app.use(Vue3DraggableResizable)

app.use(createPinia())
app.use(router)
document.title = window.GLOBAL_CONFIG?.[import.meta.env.MODE]?.title

app.mount('#app')
